var obj = {};
var a = Symbol("a");
var b = Symbol.for("b");

obj[a] = "localSymbol";
obj[b] = "globalSymbol";

console.log(Object.getOwnPropertySymbols(obj))
/**结果
[
0: Symbol(a)
1: Symbol(b)
]
 */